import { createStore, combineReducers, applyMiddleware } from 'redux'
import reduxThunk from 'redux-thunk'

import curUser from './reducers/curUser'
import users from './reducers/users'
import userGroups from './reducers/userGroups'
import appDef from './reducers/appDef'
import flowable from './reducers/flowable'

const reducers = combineReducers({
  curUser, // 当前用户
  users, // 用户列表
  userGroups, // 用户组列表
  appDef, // 用户应用
  flowable // 判断流程图依赖的flowable静态文件是否加载
})

const store = createStore(
  reducers,
  applyMiddleware(reduxThunk)
)

export default store